//
//  NormalTableViewCell.m
//  ZAKER
//
//  Created by dllo on 15/8/25.
//  Copyright (c) 2015年 蓝鸥科技. All rights reserved.
//

#import "NormalTableViewCell.h"

@interface NormalTableViewCell ()

@property (nonatomic, retain) UIImageView *thumbnailImage;
@property (nonatomic, retain) CUSFlashLabel *titleLabel;

@end

@implementation NormalTableViewCell

-(void)dealloc
{
    
    [_thumbnailImage release];
    [_titleLabel release];
    
    [super dealloc];
    
}


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        
        self.thumbnailImage = [[[UIImageView alloc]initWithFrame:CGRectMake(10 * myWidth, 10 * myHeight, 100 * myWidth, 100 * myHeight)] autorelease];
        [self.contentView addSubview:_thumbnailImage];
//        [_thumbnailImage release];
        
        
        NSInteger width = [UIScreen mainScreen].bounds.size.width - 120 * myWidth - 10 * myWidth;
        self.titleLabel = [[[CUSFlashLabel alloc]initWithFrame:CGRectMake(120, 10, (int)width, 100)] autorelease];
        [_titleLabel setTextColor: [UIColor redColor]];
        [_titleLabel setSpotlightColor:[UIColor yellowColor]];
        [_titleLabel setContentMode:UIViewContentModeCenter];
        [_titleLabel startAnimating];
        [self.contentView addSubview:_titleLabel];
//        [_titleLabel release];
        
    }
    
    return self;
    
}


-(void)setValuesWithModel:(HotModel *)model
{
    
    self.titleLabel.text = model.title;
    [self.thumbnailImage sd_setImageWithURL:[NSURL URLWithString:model.thumbnail] placeholderImage:[UIImage imageNamed:@"pla.jpg"]];
    
}

- (void)awakeFromNib
{
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    
    [super setSelected:selected animated:animated];

    
}

@end
